package com.mbds.map;

import com.google.android.gms.maps.model.LatLng;
import com.google.maps.android.clustering.ClusterItem;

public class Person implements ClusterItem{
	private static final int DEFAULT_TTL = 60; //in minute
	private LatLng position;
	private String pseudo;
	private int TTL;
	
	public Person(double lat, double lng,String pseudo) {
		position = new LatLng(lat, lng);
		this.pseudo = pseudo;
		TTL = DEFAULT_TTL;
	}

	@Override
	public LatLng getPosition() {
		return new LatLng(position.latitude, position.longitude);
	}
	
	public void setPosition(double lat, double lng) {
		position = new LatLng(lat, lng);
		
	}
	
	public String getPseudo() {
		return pseudo;
	}

	public void decreaseTTL() {
		TTL--;
		
	}

	public int getTTL() {
		return TTL;
	}

	public void resetTTL() {
		TTL = DEFAULT_TTL;
	}

	public void setPseudo(String newPseudo) {
		this.pseudo = newPseudo;
		
	}
}
